package thorsten.tools;

public class IntegerRange implements ParameterRange {
	private int min;
	private int max;
	private int step;	
	private int current;
	
	public IntegerRange(int min, int max, int step) {
		super();
		this.min = min;
		this.max = max;
		this.step = step;
		this.reset();
	}

	@Override
	public void reset() {
		this.current = this.min;
	}

	@Override
	public Object getNext() {
		int ret = this.current;
		this.current += this.step;
		return ret;
	}

	@Override
	public boolean hasNext() {		
		return this.current <= this.max;
	}

}
